package me.firstapp.repository.weixin.order;

import java.util.Date;
import java.util.List;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.weixin.order.MobileFareOrder;
import me.firstapp.repository.base.EntityRepository;

public interface MobileFareOrderRepository extends EntityRepository<MobileFareOrder> {

	Page<MobileFareOrder> findMobileFareOrderPageByOpenId(Integer pageNo, Integer pageSize, String openId);

	Page<MobileFareOrder> findMobileFareOrderPageByChiefOpenId(Integer pageNo, Integer pageSize, String chiefOpenId);

	MobileFareOrder findMobileFareOrder(String openId, String orderNo);

	MobileFareOrder findMobileFareOrder(String orderNo);

	Long findTotalOrderCounts(String chiefOpenId);

	Long findOrdersCounts(Integer status, Integer incomeGiveStatus);

	List<MobileFareOrder> findOrders(Integer status);

	Page<MobileFareOrder> findMobileFareOrderPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType, Date startTime, Date endTime);
	
	List<MobileFareOrder> findOrders(Integer status, Integer settleFlag);
}
